perm filename LEC.DAT[1,LCS] blob sn#531832 filedate 1980-08-20 generic text, type T, neo UTF8
 Music from computers		Leland Smith, Stanford University

  
When we listen  to music  produced by  a piano or  a trumpet,  or even  an
electric guitar, we do not often stop to ask what is the scientific  basis
for the sounds being produced.  But when we hear about a computer  playing
music it is usually quite a different thing.  In the past we have  thought
of computers as giant adding machines which consumed thousands of  punched
cards and then produced  thousands more, in the  form of telephone  bills,
paychecks or scientific data.   It is probably better  if we can think  of
the computer as a device for manipulating patterns or relationships and  a
device which can follow long and detailed lists of instructions.   Perhaps
the greatest difference between a computer  and an adding machine is  that
the computer has a vast "memory" where information and instructions can be
stored.  It will be seen that the production of music can require the full
capability of the computer.

We have learned that all static  physical things can be measured and  thus
described by numbers.   However when something  is constantly changing  we
must use algebraic  equations to express  the relationships involved.   In
this way we can find the numbers which will describe the particular  state
of the changing thing at any frozen moment in time.
  
Sound is produced by rapid changes of air pressure in the ear.  When these
changes are very great we say the sound is loud.  When they are  irregular
we say the sound is noise.  When  the changes are very smooth and  regular
we say the sound is musical.  There are simple formulas which can  express
the pattern of change in air pressure for a musical sound.  By using  such
formulas the computer can  produce a long string  of numbers which give  a
close approximation of the changing air pressure of a musical note.

Once these numbers are computed and stored away they could be used to draw
a picture  of the  sound wave  on  a computer  controled device  called  a
plotter.  In this  case thousands of  tiny straight lines  would be  drawn
which would seem to form smooth curves.
  
To produce real sound  these same numbers would  be transmitted at a  very
rapid rate to a device called a digital-to-analog converter, or DAC.  Each
number read from the  computer's memory is transformed  by the DAC into  a
specific voltage level of electricity.   These minute voltage changes  are
then sent over wires to an  ordinary amplifier where they are treated  the
same way as  voltage changes  produced by  a microphone  or the  vibrating
needle of a phonograph.
  
Because we need  at least  10,000 numbers to  produce one  second of  good
sound it can be understood that the main problem in computer music is  the
management of  vast  quantities of  data.   (With our  four-channel  music
system at least 6,000,000 numbers are needed for each second of sound!)
  
To better  understand the  process of  computer generated  sound we  might
compare it to the process of making moving pictures.  With movies we  know
that we are  watching thousands of  still photos which  have captured  the
successive positions of  moving objects  at rates  such as  24 times  each
second.  Because our visual mechanism can perceive separate images only at
rates less  than 16  per second,  the  series of  still images  fuse  into
apparent continuous motion.  In a sense the ear is much more sensitive  to
abrupt changes than is  the eye.  In order  to produce acceptable  musical
sounds in a manner analogous to the  cinema process we must hear at  least
10,000 separate sound impulses per second.  A graph of the voltage changes
in a microphone  produced by a  flute tone would  look quite smooth.   The
computer would simulate this by a  series of short, precise steps.   After
the jagged edge is removed from this tone by an ordinary electronic filter
it becomes virtually identical to a flute tone.
  
A typewriter keyboard is the basic means of communication with a computer.
The keyboard may produce punched cards which will be fed into the computer
or magnetic  images of  the cards  may be  written onto  some mass  memory
system, such  as  a computer  disk.   If you  are  to communicate  with  a
computer you must  use a language  it has been  programmed to  understand.
The simplest kind of computer language  might consist of a single  letter.
If you typed "P" (for  play) the computer might  play some folk tune.   If
this could be  called a language  at all it  would be a  very limited  and
special purpose  one;  and it  must  be understood  that  a good  deal  of
programming in other languages would necessary before we got to the  point
where the letter "P" became  the symbol for the  sound of any tune.   Even
the best known computer languages, FORTRAN and BASIC, are programmed  into
each different machine by means of other special languages.

I have attempted  to develop a  music language for  computers.  Once  this
language, which is called  SCORE, is learned it  is possible to cause  the
computer to play  virtually any  piece of music  by merely  typing in  the
score, that is, the notes, rhythms, and other pertinent musical data.  The
main principle of the SCORE language  is that the progress of each  aspect
of the sound is  treated separately.  Each  note in a  piece of music  has
many aspects -- or  parameters.  The parameters for  any given note  might
include pitch, begin time, duration, loudness, timbre, stereo position and
many others.  By treating the various parameters separately SCORE  enables
the musician  to create  performances with  nuances and  expression  which
approach the sound of live players.  However the greater the  flexibility,
the greater the mass of detail that must be considered.  To alleviate this
problem  SCORE  includes  many  features  which  automatically  deal  with
continuous processes of change.   SCORE also has  several ways of  dealing
with the redundancies which abound in most music.  Any string of events in
a parameter may be given an  identifying symbol.  Whenever this string  is
to appear again only the symbol need be typed.
  
Insofar  as  possible  I  have  tried  to  make  the  SCORE  language  use
terminology that all  musicians already  understand.  If the  music to  be
played uses the  tempered scale, the  ordinary letter names  of notes  are
used.  Of  course the  particular  octave range  must also  be  specified.
Sharps and flats are indicated by the letters "S" and "F". However,  SCORE
also allows easy use of microtones, that is, the pitches in between  those
found in our usual musical scales.  Letter names cannot be used for  these
sounds so they are expressed either  in Hertz numbers (cycles per  second)
or as steps in tempered scales of any number of divsions of the octave.
  
Musical rhythm is usually expressed in fractions, the lower number in  the
fraction simply indicating how many equal parts are to be found in a whole
note.  In the SCORE language only this lower number need be typed.  8 = an
eighth note, 4 = quarter note, etc.   SCORE is by no means limited to  the
usual rhythms.  5ths, 7ths, 11ths, etc. can be combined in any way.  It is
very difficult for human musicians to play rhythms such as 13 against  12.
For  the  computer  this  is  quite  easy  because  SCORE  can  understand
thirteenth and twelfth notes as easily as quarter notes.
	(Example)
  
We must remember that musical  rhythmic notation is purely relative.   The
real time value of each note is  determined by the tempo which is  usually
indicated by the number of beats to  be played in one minute.  With  SCORE
it is possible to set the tempo as often as desired.  Also it is  possible
to create accelerations or retards from one tempo to another over any time
span.  Internally the SCORE program processes the rhythmic values and  the
tempo factors so as to produce the exact real time values for each note in
a piece.
  
I have said nothing yet about the  parameter of timbre.  This is a  rather
complicated subject and one which requires a knowledge of acoustics beyond
that of most musicians.  At its  simplest, timbre, or tone color,  depends
upon particular mixtures of  several harmonics, which  alone are pure,  or
"colorless" tones.  With the Stanford computer music system it is possible
to create almost any  combination of harmonics.   However we have  learned
that our perception of timbre  is dependent upon several changing  factors
in each  note.  My  colleague at  Stanford, Professor  John Chowning,  has
found a  method utilizing  the principles  of frequency  modulation  which
provides a means  of simplifying  the production of  the most  complicated
sounds.  This  work has  progressed for  a few  years now  and the  Yamaha
Company of Japan is currently incorporating Chowning's FM system in  their
newest digital electric organs.
         (Examples, bells, tpts.)
  
Another important factor that influences  our perception of tone color  is
the "envelope" of a note.  The envelope can be described by a graph  which
shows the detailed amplitude, or loudness changes throughout the  duration
of note.  Ordinary instruments produce very complex envelopes.  In fact it
turns out that many instruments  produce independant envelopes on each  of
upwards of 32 harmonics.  This is one reason why it is rather difficult to
successfully create the effect of a "live" instrument.

The dull sound of a simple sinusoid  wave can become a pleasant bell  when
an envelope of an exponential shape  is applied.  The sine wave becomes  a
flute when a slight emphasis is added  to the first part of the  envelope.
The same basic wave  can take on the  characteristic of a tuned  woodblock
when the full volume is  restricted to just a  few complete cycles of  the
wave.
	(Examples)
 
Some of you may  have heard tales of  computers actually composing  music.
To a certain extent  this really can  be done.  In  order to discuss  this
properly I would  have to investigate  thoroughly the human  compositional
process.  It will have to suffice  to point out that all composers  follow
rules, whether they  know it  or not.   Usually even  the simpler  musical
styles involve rules with  vast possibilities.  With computer  composition
as  many  rules  as  possible  are  written  into  a  program  as  logical
statements.  These programs  usually include subprograms  known as  random
number generators.  The notes and rhythms may be picked at random but  the
given rules may often  reject certain choices,  causing the random  number
generator to try again until it picks something suitable.  Some years  ago
I made some first  steps at teaching the  computer the principles of  jazz
improvisation.  The  bass  line  picks  only notes  which  fit  the  chord
progression of the "blues".  The solo line, however, can pick from as many
as ten notes at any given time,  even though there are only three or  four
notes in the various  chords.  The program was  so constructed as to  make
any "non-chord" note that happened to be picked conform to the traditional
rules of harmony.  The result is  hardly inspired jazz.  Rather it  sounds
like the  first attempts  of an  earnest, but  not very  talented  student
trying his hand at improvisation.
  
      (Example)

The next few examples were created in order to test the ease of using  the
SCORE language with conventional music.  I  chose works by Bach becasue  I
feel quite sure that the computer  manipulation of themes would have  been
of great interest  to this composer  of canons and  fugues.  The first  of
this set, (which  I call  "Binary Bach") is  the "riddle  canon" from  the
Musical Offering.  This little  piece, which has the  title, "seek and  ye
shall find", is written as single line of music.  But it is really a  duet
where the lower voice  is to play backwards  from the music turned  upside
down.  It was necessary to type in only the notes of the main voice to the
SCORE program.  By  designating the main  voice "Z", the  second voice  is
created to Bach's specifications by  typing "$Z-10".  The "$" inverts  the
voice and the "-10" transposes it down 10 half steps to create the  proper
harmonic combinations.
         (Example).
  
Bach wrote the Musical Offering as a tribute to Frederick the Great,  King
of Prussia.  The title of the next piece is "the modulation ascends as the
glory of the king ascends".  Bach  was a true diplomat because this  music
implies that the king's glory is boundless and eternal.  The written music
conludes with the first measure repeated a step higher than it had been at
the beginning.  Bach then puts a wavy  line to show that the piece  should
go on this way, always higher and higher, never ending.  To make the  work
a practical length I have the voices constantly accelerating and moving by
circular paths into  the distance,  until they  finally disappear.   Using
SCORE, this required less than one page of typing.
      (Example).
  
The next  two  pieces are  also  from  the Musical  Offering.   The  first
includes woodblock sounds which are  produced by limiting the duration  of
each note to  only ten  cycles of the  sound.  Along  with this  frequency
modulation sounds are used in the bass.  The second piece has a constantly
changing organ-type bass and woodblock and bell sounds.
      (Example).
  
By now you can  see that the  computer may be  considered as just  another
musical instrument.  But perhaps it is the ultimate musical instrument.  I
believe it will be able to play any sounds that a musician can imagine  in
his mind.  Beyond this the  computer can, in a  limited way, take part  in
the  compositional  process  itself.   In  my  "Rhapsody  for  Flute   and
Computer", composed in 1971, perhaps  two-thirds of the notes were  chosen
by some sort of  controlled random selection methods.   Some of the  flute
part was written first, then the  computer part was produced and then  the
flute part was  expanded to its  final form to  take advantage of  certain
aspects of the computer choices.
  
The last music to be heard is  from the end of "Machines of Loving  Grace"
which I composed in 1970.  Only the computer part of this excerpt will  be
heard but  the original  of this  work includes  a reading  of a  poem  by
Richard Brautigan and  a part  for solo  bassoon.  Two  melodic lines  and
three chord structures form  the basis for this  piece.  In the middle  of
the excerpt you will hear the melodic  lines in their simple form, but  as
they proceed,  the slide  from one  note to  another becomes  greater  and
greater until the sound is a kind of wailing.  The lines then evolve  into
pinpoints of staccato notes as the final chords of the work emerge.
  
Computer music is  still in its  beginning stages but  there seems  little
doubt that this medium of expression will soon occupy a prime position  in
our culture.   The means  for  producing computer  music are  still  quite
expensive but there is every reason to believe that the cost for  adequate
facilities can eventually  become less  than the  price of  three or  four
grand pianos.  Meanwhile the number  of computer music centers is  growing
to the point where it will not be too long before all the world's  leading
composers will have the opportunity to work in this medium.